#include "bTree.h"
#include <memory.h>

template<typename Data>
MyBTreeNode<Data>::MyBTreeNode()
{
	memset(this->m_ayData, 0, sizeof(Data)*TVALUE);
	memset(this->m_aychilds, 0, sizeof(MyBTreeNode*)*(TVALUE+1));
	m_curNum = 0;
	m_bIsLeaf = false;
}

template<typename Data>
Data& MyBTreeNode<Data>::getDataByIndex(int index)
{
	return m_ayData[index];
}

template<typename Data>
void MyBTreeNode<Data>::setDataByIndex(int index, Data &value)
{
	m_ayData[index] = value;
}

template<typename Data>
MyBTreeNode<Data>* MyBTreeNode<Data>::getPointerByIndex(int index)
{
	return m_aychilds[index];
}

template<typename Data>
void MyBTreeNode<Data>::setPointerByIndex(int index, MyBTreeNode* &p)
{
	m_aychilds[index] = p;
}

template<typename Data>
bool MyBTreeNode<Data>::isLeaf()
{
	return m_bIsLeaf;
}

template<typename Data>
int MyBTreeNode<Data>::getKeyWorldNum()
{
	return m_curNum;
}

template<typename Data>
MyBTreeNode<Data>:: ~MyBTreeNode()
{
	
	
}

